<div class="weui_cells weui_cells_form" style="border-radius:0.5rem;" ng-repeat="(i,item) in pagedata.post.content">            
				<div ng-if="item.type == 4" class="weui_cells_title" style="padding-left:0"><span class="bold" style="color:#18bc9c">{{i+1}}</span> {{item.title}}</div>
				<div ng-if="item.type == 4" class="weui_cells weui_cells_radio2">
						<label class="weui_cell weui_check_label dashed" ng-repeat="(key,value) in item.xuanxiang">
							<div class="weui_cell_ft" href="javascript:;" ng-click="item.data=key;pagedata.checkdanan(i,key);">
								<input type="radio" class="weui_check" name="radio{{i}}">
								<span class="weui_icon_checked"></span>
							</div>
							<div class="weui_cell_bd weui_cell_primary">
								<span style="float:left;width:100%">{{pagedata.danan_key[key]}}.{{value.title}}</span>
							</div>
							
						</label>
				</div>	
				<div ng-if="item.type == 5" class="weui_cells_title" style="padding-left:0"><span class="bold" style="color:#18bc9c">{{i+1}}</span> {{item.title}}</div>
				<div ng-if="item.type == 5" class="weui_cells weui_cells_checkbox" style="padding:0.5rem">
						<label class="weui_cell weui_check_label" ng-repeat="(key,value) in item.xuanxiang">
							<div class="weui_cell_hd">
								<input type="checkbox" ng-click="duoxuans(key,item,'data')" class="weui_check" ng-checked="item.data.indexOf(';'+key+';')>=0">
								<i class="weui_icon_checked"></i>
							</div>
							<div class="weui_cell_bd weui_cell_primary">
								<span>{{pagedata.danan_key[key]}}. {{value.title}}</span>
							</div>
						</label>
				</div>
				<div ng-if="item.type == 20" class="weui_cells_title" style="padding-left:0"><span class="bold" style="color:#18bc9c">{{i+1}}</span> {{item.title}}</div>
				<div ng-if="item.type == 20" class="weui_cells weui_cells_radio2">
						<label class="weui_cell weui_check_label dashed">
							<div class="weui_cell_ft" href="javascript:;"  ng-click="item.data=0;pagedata.checkdanan(i,0);">
								<input type="radio" class="weui_check" name="radio{{i}}">
								<span class="weui_icon_checked"></span>
							</div>
							<div class="weui_cell_bd weui_cell_primary">
								<span style="float:left;width:100%">{{pagedata.danan_key[0]}}.错</span>
							</div>
						</label>
						<label class="weui_cell weui_check_label dashed">
							<div class="weui_cell_ft" href="javascript:;"  ng-click="item.data=1;pagedata.checkdanan(i,1);">
								<input type="radio" class="weui_check" name="radio{{i}}">
								<span class="weui_icon_checked"></span>
							</div>
							<div class="weui_cell_bd weui_cell_primary">
								<span style="float:left;width:100%">{{pagedata.danan_key[1]}}.对</span>
							</div>
							
						</label>
				</div>
				<div ng-if="item.iscuo == 1" class="weui_cell" style="background:#f2f2f2;padding:0.5rem;margin-bottom:0.5rem">
						<div class="weui_cell_hd red">
							答题错误：正确答案是	
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							{{item.daan}}
						</div>
				</div>
				<div ng-if="item.iscuo == 1" class="weui_cell" style="background:#f2f2f2;padding:0.5rem;margin-bottom:0.5rem">
						<div class="weui_cell_bd weui_cell_primary">
							{{item.desc || '暂无解析'}}
						</div>
				</div>
</div>
<script type="text/javascript">
scope.pagedata.extradata=scope.pagedata.extradata?scope.pagedata.extradata:{}
scope.pagedata.checkdanan=function(i,key){
	if(scope.pagedata.post.content[i].daan!=scope.pagedata.danan_key[key]){
		scope.pagedata.post.content[i].iscuo=1;
	}else{
		scope.pagedata.post.content[i].iscuo=0;
	}
}
scope.pagedata.diyfrompost=function(pageid,index){
	var str = /^[1][3,4,5,7,8][0-9]{9}$///手机
    var strname =  /^[\u4e00-\u9fa5]+(·[\u4e00-\u9fa5]+)*$/ //中文
    var stremail = /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
    var filedata = scope.pagedata.post.content
	for (var i=0;i<filedata.length;i++){
		if((filedata[i].ismust ==1 || filedata[i].ismust ==1) && !filedata[i].data){
			scope.message(filedata[i].title +'-不能为空！','error');
			return false
		}
		if(filedata[i].type ==8 && (filedata[i].ismust ==1 || filedata[i].ismust ==1)){
			if(!(str.test(filedata[i].data))){
			  scope.message("请输入正确的手机号码！",'error')
			}
		}
		if(filedata[i].type ==9 && (filedata[i].ismust ==1 || filedata[i].ismust ==1)){
			if(!(stremail.test(filedata[i].data))){
			  scope.message("请输入正确的邮箱！",'error')
			}
		}
	}
	scope.post_json('jy_lineks/detail/post/',{'content':filedata},function(result){
		scope.message("提交答卷成功！",'error')
	});
}
</script>
